import { Button, Space, Image } from "antd";
import { NumText } from "@/pages/OrderModule/common/components/CommonText/components/NumText";
import Typography from "@/pages/OrderModule/common/components/Typography";
import Style from "./index.module.less";

export function useGoodsColumns() {
	const goodsColumns = [
		{
			title: "序号",
			dataIndex: "field1",
			render(value, record) {
				return <Typography as="s1">{value}</Typography>;
			}
		},
		{
			title: "图片",
			dataIndex: "field2",
			render(value, record) {
				return <Image className={Style.goods_image} width={55} src={value} />;
			}
		},
		{
			title: "商品名称",
			dataIndex: "field3",
			render(value, record) {
				return <Typography as="s1">{value}</Typography>;
			}
		},
		{
			title: "款式编码",
			dataIndex: "field4",
			render(value, record) {
				return <Typography as="s1">{value}</Typography>;
			}
		},
		{
			title: "商品编码",
			dataIndex: "field5",
			render(value, record) {
				return <Typography as="s1">{value}</Typography>;
			}
		},
		{
			title: "商品简称",
			dataIndex: "field6",
			render(value, record) {
				return <Typography as="s1">{value}</Typography>;
			}
		},
		{
			title: "颜色规格",
			dataIndex: "field7",
			render(value, record) {
				return <Typography as="s1">{value}</Typography>;
			}
		},
		{
			title: "零售价",
			dataIndex: "field8",
			render(value, record) {
				return <NumText as="s1" pre="￥" num={value} />;
			}
		},
		{
			title: "采购价",
			dataIndex: "field9",
			render(value, record) {
				return <NumText as="s1" pre="￥" num={value} />;
			}
		},
		{
			title: "成本价",
			dataIndex: "field10",
			render(value, record) {
				return <NumText as="s1" pre="￥" num={value} />;
			}
		},
		{
			title: "市场价|吊牌价",
			dataIndex: "field11",
			render(value, record) {
				return <NumText as="s1" pre="￥" num={value} />;
			}
		},
		{
			title: "可用库存",
			dataIndex: "field12",
			render(value, record) {
				return <NumText as="s1" num={value} />;
			}
		},
		{
			title: "虚拟库存",
			dataIndex: "field13",
			render(value, record) {
				return <NumText as="s1" num={value} />;
			}
		},
		{
			title: "重量",
			dataIndex: "field14",
			render(value, record) {
				return <NumText as="s1" suffix="kg" num={value} />;
			}
		}
	];
	return { goodsColumns };
}
